package com.ruoyi.kepServer.aircompressor.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; //添加
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.kepServer.aircompressor.mapper.AircompressorMapper;
import com.ruoyi.kepServer.aircompressor.domain.Aircompressor;
import com.ruoyi.kepServer.aircompressor.service.IAircompressorService;

/**
 * kepserver空压机Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-05
 */
@Service
public class AircompressorServiceImpl extends ServiceImpl<AircompressorMapper, Aircompressor> implements IAircompressorService //修改
{
    @Autowired
    private AircompressorMapper aircompressorMapper;

    /**
     * 查询kepserver空压机
     * 
     * @param tagName kepserver空压机主键
     * @return kepserver空压机
     */
    @Override
    public Aircompressor selectAircompressorByTagName(String tagName)
    {
        return aircompressorMapper.selectAircompressorByTagName(tagName);
    }

    /**
     * 查询kepserver空压机列表
     * 
     * @param aircompressor kepserver空压机
     * @return kepserver空压机
     */
    @Override
    public List<Aircompressor> selectAircompressorList(Aircompressor aircompressor)
    {
        return aircompressorMapper.selectAircompressorList(aircompressor);
    }

    /**
     * 新增kepserver空压机
     * 
     * @param aircompressor kepserver空压机
     * @return 结果
     */
    @Override
    public int insertAircompressor(Aircompressor aircompressor)
    {
        return aircompressorMapper.insertAircompressor(aircompressor);
    }

    /**
     * 修改kepserver空压机
     * 
     * @param aircompressor kepserver空压机
     * @return 结果
     */
    @Override
    public int updateAircompressor(Aircompressor aircompressor)
    {
        aircompressor.setUpdateTime(DateUtils.getNowDate());
        return aircompressorMapper.updateAircompressor(aircompressor);
    }

    /**
     * 批量删除kepserver空压机
     * 
     * @param tagNames 需要删除的kepserver空压机主键
     * @return 结果
     */
    @Override
    public int deleteAircompressorByTagNames(String[] tagNames)
    {
        return aircompressorMapper.deleteAircompressorByTagNames(tagNames);
    }

    /**
     * 删除kepserver空压机信息
     * 
     * @param tagName kepserver空压机主键
     * @return 结果
     */
    @Override
    public int deleteAircompressorByTagName(String tagName)
    {
        return aircompressorMapper.deleteAircompressorByTagName(tagName);
    }

    @Override
    public List<Aircompressor> getYfValueList() {
        return aircompressorMapper.getYfValueList();
    }

    @Override
    public List<Aircompressor> getDyDpYfValueList() {
        return aircompressorMapper.getDyDpYfValueList();
    }
}
